//
//  BaseTableViewController.swift
//  Sina Weibo
//
//  Created by 斩尘 on 15/10/6.
//  Copyright © 2015年 陈帅. All rights reserved.
//

import UIKit

class BaseTableViewController: UITableViewController,VisitorLoginViewDelegate {


    var visitorLoginView : VisitorLoginView?
    
    override func loadView() {


        visitorLoginView = NSBundle.mainBundle().loadNibNamed("VisitorLoginView", owner: nil, options: nil).last as? VisitorLoginView
        
        visitorLoginView?.visitorViewDelegate = self
        
        
        view = visitorLoginView
        
        self.navigationItem.leftBarButtonItem = UIBarButtonItem(title: "注册", style: UIBarButtonItemStyle.Plain, target: self, action: "visitorWillRegister")
        

        self.navigationItem.rightBarButtonItem = UIBarButtonItem(title: "登陆", style: UIBarButtonItemStyle.Plain, target: self, action: "visitorWillLogin")
        
        
//        print(view)
    }
    
    func visitorWillRegister() {
        print("注册")
    }
    
    func visitorWillLogin() {
        print("登陆")
    }
    
    override func viewDidLoad() {
        super.viewDidLoad()

    }
   
}
